package com.lujieni.proxy.cloud;


import com.lujieni.proxy.cloud.fallback.ConsumerFallback;
import com.lujieni.proxy.cloud.po.StudentPO;
import com.lujieni.shared.dto.StudentDTO;
import com.lujieni.shared.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(name = "cloud-provider", fallback = ConsumerFallback.class) // url = "http://localhost:9003"
public interface CloudFeign {
    @GetMapping("/love/hello")
    String sayHello();
    @GetMapping("/love/bye")
    List<StudentPO> sayBye();
    @PostMapping("/love/user/register")
    boolean register(UserDTO userDTO);
    @PostMapping("/love/student/insert")
    void insertStudent(StudentDTO studentDTO);

}
